s = [str(i) for i in range(10)]

queue = s[1:]
n = 2
# 广度优先，队列
while queue:
    t = queue.pop(0)
    print(t,end=',')
    if len(t) < n:
        queue.extend([t+i for i in s])